﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SdmxMl.Panels
{
    public partial class DlgGetFromList : Form
    {
        public string Group { get; private set; }

        public DlgGetFromList(List<string>SelList)
        {
            InitializeComponent();
            comboBoxGroup.Items.AddRange(SelList.ToArray<string>());
            if (SelList.Count > 0)
                comboBoxGroup.SelectedIndex = 0;
        }

        private void buttonOk_Click(object sender, EventArgs e)
        {
            Group = comboBoxGroup.SelectedItem.ToString();
            DialogResult = System.Windows.Forms.DialogResult.OK;
        }
    }
}
